package cn.hollis.nft.turbo.admin.controller;

import cn.hollis.nft.turbo.api.chain.service.ChainFacadeService;
import cn.hollis.nft.turbo.api.collection.service.CollectionFacadeService;
import cn.hollis.nft.turbo.api.collection.service.CollectionManageFacadeService;
import cn.hollis.nft.turbo.api.goods.service.GoodsFacadeService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/rpc")
@RestController
public class RPCTestController {
    @DubboReference(version = "1.0.0")
    private ChainFacadeService chainFacadeService;

    @DubboReference(version = "1.0.0")
    private GoodsFacadeService goodsFacadeService;
    @DubboReference(version = "1.0.0")
    private CollectionFacadeService collectionFacadeService;

    @DubboReference(version = "1.0.0")
    private CollectionManageFacadeService  collectionManageFacadeService;
    @RequestMapping("/chainFacadeService")
    public String chainFacadeServiceTest(){
        return "chainFacadeService";
    }

    @RequestMapping("/goodsFacadeService")
    public String goodsFacadeServiceTest(){
        goodsFacadeService.test("goodsFacadeService");
        return "chainFacadeService";
    }

    @RequestMapping("/collectionFacadeService")
    public String collectionFacadeServiceTest(){
        collectionFacadeService.test("collectionFacadeService");
        return "collectionFacadeService";
    }
    @RequestMapping("/collectionManageFacadeService")
    public String collectionManageFacadeServiceTest(){
        collectionManageFacadeService.test("collectionManageFacadeService");
        return "collectionManageFacadeService";
    }
}
